<% content_for :no_app_layout, true %>

<% content_for :head do %>
  <%
    # Social sharing URLs.
    title = 'Thredded'
    description = 'Forums, feature-rich and simple.'
    url = 'https://thredded.org'
    # This image template can be found at https://sandbox.imgix.com/view?url=https://images.unsplash.com/photo-1446051642017-6d07a440087f%3Fshad%3D20%26w%3D1200%26chromasub%3D444%26fm%3Dpjpg%26usm%3D20%26h%3D630%26fit%3Dcrop%26exp%3D-10%26mark64%3DaHR0cHM6Ly9hc3NldHMuaW1naXgubmV0L350ZXh0P2g9NjMwJnR4dGNscj1mZmYmdHh0PVRocmVkZGVkJnc9MTIwMCZ0eHRzaXplPTgwJnR4dGxlYWQ9MCZ0eHRwYWQ9MTI1JnR4dGZvbnQ9YXZlbmlyLWJsYWNrJnR4dGFsaWduPWNlbnRlcg%26markalign%3Dcenter%252Ctop%26txt64%3DT1NTIEZvcnVtcyBhdCDimqEgTGlnaHRzcGVlZCDimqE%26txtalign%3Dcenter%26txtclr%3Dfff%26txtsize%3D48%26txtpad%3D225%26balph%3D50%26bm%3Dscreen%26bs%3Dinherit
    image_url = 'https://images.unsplash.com/photo-1446051642017-6d07a440087f?bs=inherit&bm=screen&balph=50&txtpad=225&txtsize=48&txtclr=fff&txtalign=center&txt64=T1NTIEZvcnVtcyBhdCDimqEgTGlnaHRzcGVlZCDimqE&markalign=center%2Ctop&mark64=aHR0cHM6Ly9hc3NldHMuaW1naXgubmV0L350ZXh0P2g9NjMwJnR4dGNscj1mZmYmdHh0PVRocmVkZGVkJnc9MTIwMCZ0eHRzaXplPTgwJnR4dGxlYWQ9MCZ0eHRwYWQ9MTI1JnR4dGZvbnQ9YXZlbmlyLWJsYWNrJnR4dGFsaWduPWNlbnRlcg&exp=-10&fit=crop&h=630&usm=20&fm=pjpg&chromasub=444&w=1200&shad=20'
  %>
  <meta property="og:title" content="<%= title %>">
  <meta property="og:description" content="<%= description %>">
  <meta property="og:image" content="<%= image_url %>">
  <meta property="og:url" content="<%= url %>">
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@thredded"/>
<% end %>

<div class="home">
  <div class="home-masthead">
    <div class="home-container">
      <h1 class="home-masthead-title">Thredded</h1>
      <p class="home-masthead-lead">
        Forums, feature-rich and simple.<br>An engine for <span class="home-nowrap">Ruby on Rails</span>.<br>
      </p>
      <nav class="home-masthead-nav">
        <ul id="home-nav">
          <li class="home-current"><a href="/">About</a></li>
          <li><a href="<%= thredded.root_path %>">Demo</a></li>
          <li><a href="https://github.com/thredded/thredded">GitHub</a></li>
          <li><a href="http://www.rubydoc.info/gems/thredded">Docs</a></li>
        </ul>
      </nav>
    </div>
    <a class="home-masthead-mobile-screenshot" href="<%= thredded.root_path %>" id="home-mobile-screenshot">
      <img alt="Thredded Screenshot on iPhone 6 (v0.8.2)"
           src="https://cloud.githubusercontent.com/assets/216339/20338433/0920debc-abcf-11e6-811c-8f29d10dfed7.png">
    </a>
  </div>

  <div class="home-about" id="home-about">
    <div class="home-container">
      <section>
        <p>
          Format your posts with <b>Markdown</b> by default and / or BBCode, with
          <a href="https://github.com/discourse/onebox" target="_blank">onebox</a> and
          <code>&lt;spoiler&gt;</code> tag support.
        </p>

        <p>
          Never miss an update with <b>@-mentions</b>, email notifications, and (un)read posts tracking.
        </p>

        <p>
          Enjoy the <b>fully-responsive minimalistic theme</b>, configurable via Sass.
        </p>

        <p>
          Find posts quickly with <b>full-text search</b>, using only the database.
        </p>

        <p>
          Stop the trolls with a basic <b>moderation system</b>.
        </p>

        <p>Thredded also has:</p>
        <ul>
          <li>Pinned and locked topics.</li>
          <li>Private group messaging.</li>
          <li>(Un)read posts tracking.</li>
          <li>List of currently online users, global and per-messageboard.</li>
          <li>
            <a href="https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fthredded.org%2Fthredded&tab=mobile">
              Page Speed
            </a> score of <span class="home-page-speed-score">100</span> on Mobile and Desktop.
          </li>
        </ul>

        <p>
          Thredded has <b>no infrastructure dependencies other than the database</b>.<br>
          Currently, Thredded supports SQLite, MySQL v5.6.4+, and PostgreSQL.
        </p>

        <p>
          Thredded can be <b>easily integrated</b> into the rest of your Rails app as an engine, and will work with
          your existing auth. There is also a one-step app generator that can create a new Rails app with
          Thredded.
        </p>

        <p>
          Thredded has been <b>built for extensibility</b>, and provides a modular post rendering pipeline, flexible
          permissions system.
        </p>

        <p>
          Thredded uses <b>i18n</b> throughout and has been translated into Brazilian Portuguese, Chinese (Simplified),
          German, Polish, Italian, Russian, French, and Spanish.
        </p>
      </section>

      <section>
        <h3><%= link_to 'See it in action', thredded.root_path %></h3>
        <ul>
          <li>
            <%= link_to 'Demo forums', thredded.root_path %>. The demo is reset daily.
          </li>
          <% unless Rails.env.production? -%>
            <li>
              <%= link_to 'Preview theme', thredded.theme_preview_path %> on a single page aggregating all of the
              views and styles.
            </li>
          <% end -%>
          <li>
            <%= link_to 'See the e-mails', rails_email_preview.rep_root_path %> sent by Thredded.
          </li>
          <li>
            <%= link_to 'Sign in', new_user_session_path %> as anyone to post, create threads, etc.
            The only requirement in this demo app is a username.
          </li>
        </ul>
      </section>

      <p>
        See the <a href="https://github.com/thredded/thredded">source code on GitHub</a>.
      </p>

      <footer>
        <p>
          Thredded supports Rails v5.2+.
          This demo app is powered by Rails v<%= Rails::VERSION::STRING %>.
        </p>

        <p>
          This demo runs Thredded v<%= Thredded::VERSION %> and has the following plugins installed:
        </p>
        <ul>
          <li>
            <a href="https://github.com/thredded/thredded-markdown_coderay">markdown_coderay</a>
            provides code syntax highlighting using <a href="https://github.com/rubychan/coderay">Coderay</a>.
          </li>
          <li>
            <a href="https://github.com/thredded/thredded-markdown_katex">markdown_katex</a>
            provides accessible server-side TeX math rendering
            via <a href="https://khan.github.io/KaTeX/">KaTeX</a>.
          </li>
        </ul>

        <p>
          Thredded can be run standalone or as part of an existing Rails app.

          Thredded supports all modern browsers including IE9+, all versions of Turbolinks, and async and deferred
          script loading.
        </p>

        <p>
          This demo app uses emoji images from <a href="https://github.com/twitter/twemoji" target="_blank">Twemoji</a>.
        </p>
      </footer>
    </div>
  </div>
</div>
